package ar.com.fiuba.ElectronicCircuitAnalyst.domain.api;

import java.util.List;

import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.CircuitElementNotFoundException;
import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.CircuitInputValuesException;

/**
 * A Circuit consists in a set of CircuitElements that can be connected between
 * them or to the inputs and outputs of this circuit.
 */
public interface Circuit extends CircuitElement {

	/**
	 * sets the values for the Circuit inputs
	 * 
	 * @param values
	 *            the boolean values of the circuit inputs
	 * @throws CircuitInputValuesException
	 */
	public void setInputValues(List<Boolean> values) throws CircuitInputValuesException;

	/**
	 * @return the current values of the Circuit outputs
	 */
	public List<Boolean> getOutputValues();

	/**
	 * @return the name of this component
	 */
	public String getName();

	/**
	 * @return a list with all the CircuitElements within the Circuit
	 */
	public List<CircuitElement> getCircuitElements();

	/**
	 * Returns a circuit element within the circuit with the given name.
	 * 
	 * @return a circuit identified with the Parameter Name, or null if not
	 *         exist such circuitElement
	 * @throws CircuitElementNotFoundException
	 *             if there's no such circuit element with that name in the
	 *             circuit.
	 */
	public CircuitElement getCircuitElementByName(String name) throws CircuitElementNotFoundException;

}
